package com.leyou.item.service;

import com.leyou.item.mapper.SpecParamMapper;
import com.leyou.item.pojo.SpecParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpecParamService {

    @Autowired
    SpecParamMapper spm;


    public List<SpecParam> queryByGid(Long gid, Long cid, Boolean searching, Boolean generic) {
        // 根据group_id 去tb_spec_param去查询数据
        SpecParam specParam = new SpecParam();
        specParam.setGroupId(gid);
        specParam.setCid(cid);
        specParam.setSearching(searching);
        specParam.setGeneric(generic);
        List<SpecParam> list = spm.select(specParam);
        return list;

    }
}
